home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
telecomm
/
sticpsrc.lzh
/
DOC
/
ATARI.ARC
/
ATARI.DOC
next >
Wrap
Text File
|
1988-07-15
|
12KB
|
286 lines
06601030305800
F0000000
9[...................................................]001
êNETandBMportedtotheAtariST
Ç
byR.E.Janssen,PE1CHL.
TheNETandBMprogramshavebeenportedtotheAtariSTseries
ofcomputers.AllmodelsoftheSTseries(260,520,1040and
MEGA)arebasicallythesame,andtheprogramsshouldrunonall
versions,bothwithTOSinRAM,andtheoriginalorthe"blitter
TOS"inROM.TheprogramshavebeencompiledusingMarkWilliams
Cversion2.1.7.Othercompilersrequirequitesomechangesto
manymodules,soIrecommendstickingwithMWifyouwantto
recompilethepackage.
êChangesmadewhenportingtotheAtariSTÇ
-BecausetheAtariSTissoldwiththeGEMDesktopasthe
primaryuserinterface,no"standard"commandprocessor
existsthatcanbecalledfromNETandBMwhenasubshellis
requested.However,severalcommandprocessorsexist,both
availablecommerciallyandinthepublicdomain.Therefore,
avariantofthe"shell"commandhasbeenimplementedin
NET,thatallowsyoutosetthepathnameoftheprogramto
beexecutedasacommandprocessor.Thesyntaxis:
shell=pathname
Thisstatementcanbeincludedintheautoexec.netfile.
Example:
shell=c:\toolkit\command.tos
NoequivalentsyntaxhasbeenbuiltinBM,Ithingthe
configurationfileaccessroutinesshouldbemadesomewhat
moresophisticated,beforeaddingtoomanyoptional
reconfigurationcommands.Workstilltobedone...
-Thisimplementationonlyknowsabout"asy"hardware.2
portsaredefined,onebeingtheRS232serialport,andthe
othertheMIDIserialport.BothcanbeusedforKISSor
SLIPlinks.
TheRS232portcanbeattachedwith:
attach asy 0 0 ax25 ax0 2048 256 9600
Thisattachestheportforax25(KISS)operation,asdevice
ax0,witha2048bytebuffer,anMTUof256,andabaudrate
of9600bauds.
TheRS232portisaccessedusing"hardwareaddress"0.This
doesnotrepresentthephysicallocationofthechip,but
ratherthedevicenumberusedintheAtariIorec()call...
Validbaudratesare300,600,1200,1800,2000,2400,3600,
4800,9600and19200bauds.
Ç
TheMIDIportcanbeattachedwith:
attach asy 2 0 ax25 ax1 2048 256 9600
ThisportusesthesameparameterstructureastheRS232
portattachcommand.The"hardwareaddress"is2.
Somerestrictionsapplytotheusageofthisport:
-Thebaudrateisonlysettableto7812or31250bauds.A
simplehardwaremodificationmakesitpossibleto
changethisto9600or38400bauds,butthesoftware
can'ttellthedifference,soitwillblindlyaccept
all4mentionedvaluesforthebaudrate,assumingthat
youinstalledthemodifyouspecify9600or38400.
-Ofcourse,theinterfaceonthisportisa5mAcurrent
loop,soyouwillneedanexternalconversioncircuit
ifyouwanttoconnectthistoanRS232TNC.Please
note,that"currentON"onthemidiportcorrespondsto
apositivevoltageontheRS232pins,thisisreverse
from"normal"currentloopoperationasusedwith
teleprintersandthelike.
-Thetransmitroutineonthisportdoesnotuse
interrupts,butitbusy-waitsforeachcharacterina
frame.Thisisbecausetheinterrupthandlerforthe
serialchipusedonMIDIissharedwiththe
keyboard/mouseinterrupthandler,anditdoesnot
supporttransmitterinterrupts....
TheMIDIportCANbeusedtolinktwoSTsusingSLIP,andno
hardwaremodsarenecessary.Onlyconnect4wiresbetween
theMIDIportsonthemachines(fromMIDIINtoMIDIOUTand
viceversa)andusethefollowingattachcommand:
attach asy 2 0 slip sl0 4096 576 31250
- End-of-lineconventions.Someextraworkhasgonein
attemptstocorrecttheend-of-linesequencesgeneratedby
theRECORDcommandsformAX.25andTELNET,andtheASCII
typefiletransferfromFTP.AsobservedbyPhil,thewhole
messofCR/LFhandlinghasbeenneatlyavoidedbyUNIX,but
wepoorsoulsusingMS-DOS(orAtariTOS)needtosolvethe
probleminsomeway.OntheMarkWilliamscompilerforthe
ST,thedefaultopenmodeforfilesis"textmode",andin
thiscaseall\ncharactersgettranslatedtoCR/LFpairsin
thefile,andvice-versa.ThismeansthatwritingCR/LFin
textmoderesultsinCR/CR/LFinthefile.Youcanopenthe
filein"binarymode"(using"wb"inthefopencall),and
thecharacterswillbewrittenuntranslated.Thisseemsto
bemorelikethebehaviourofAztecC,soIusedthebinary
modeasatemporaryfixfortheproblemswithRECORDmode,
butthisshouldreallybefixedinthecodeatthe
Çappropriateplace.IdidsomeworkinthecodeforAX.25
mode,butcommenteditoutfornow.TheTELNETcodestill
needstobeconverted.IFyouwanttogetthiscorrectin
theUNIXversion,itshouldbefixedbecauseUNIXdoesnot
knowabout"filemodes"andalwayswriteswhatyoutellit
towrite...
-BMfilenamingconventionshavebeenchangedtoallowuseof
theprogramonnon-DOSenvironments,usingthesameapproach
asintheNETprogram(871225release).Module"files.c"is
nowalsousedbyBM,andindefinesallfilenamesand
directorynamesusedintheprogram.Thebm_rc[]definition
hasbeenaddedforthispurpose.Pleasenote,that
directorynamesalsoincludethetrailing\or/character,
thisisbecausetheseparatorcharacteruseddiffersbetween
DOS,UNIXandAtariTOS.Thisalsomeansthatthesyntaxof
the"smtp"commandintheBM.RCfilehaschanged,itnow
shouldalsoincludethetrailingseparator.Infact,the
smtpcommandisnotreallynecessarybecausethedefault
valueisnowequaltothevalueusedbyNET.
ê
Ç-DIRUTIL.ChasbeenrevisedtorunonbothMS-DOSandAtari
TOS,andsomecleanuphasbeendoneonthecode.Now,itis
possibletodefinethecharacterusedtoseparatethedigits
inlargenumbers,bycompilingwith-DTHSEP="'.'"
- BMnowusesNET'sversionofDIRUTIL.C.Thismodulecould
besplituptoavoidinclusionofdirectoryprintroutines.
-AnextraoptionhasbeenaddedtoBM.RC:
tzTIM
setsthetimezoneusedindate/timestringsproducedbyBM.
Thiswasnecessarybecausenostandardwayhasbeendefined
toaddvaluestothetop-levelenvironmentoftheST
operatingsystem,sothegetenv()wouldalwaysfailifyou
startedBMfromthedesktop.Now,youcandefineyourlocal
timezoneinBM.RC(shouldbe3characters,e.g.GMT,WET).
- ChangesweremadetoGLOBAL.HbecauseofbugsintheMark
WilliamsCcompiler:
-theconstruct'x>>16'confusestheoptimizer,
thereforethehiworddefinehasbeenchangedtoa
function,andtheshiftiscodeddifferentlyinthis
function(atari.c)
-thecompilerdoesn'tlikevoidpointerstobefurther
typecasted.(asin:(structmbuf**)(void*)0)
therefore,thegeneralpurposepointerhasbeenchanged
tochar*type.
-STILLEXPERIMENTAL:Desktopaccessoryversion
ÇI'mworkingonaversionofNETthatcanrunasadesktop
accessoryontheST.Thecodeisincludedwiththis
version,andcanbecomiledbydefiningtheGEMDESK
preprocessorsymbol.Anentryinthemakefile,NET.ACC,
providesforthis.Theresultingprogramstillhassome
problems